1. Field of the Invention
A certain aspect of this disclosure relates to an image scanning device, an image forming apparatus including the image scanning device, and an image scanning method.
2. Description of the Related Art
An image scanning device optically scans a document to obtain image information and converts the image information into an electric signal. An image forming apparatus including the image scanning device prints an image on a recording medium such as paper based on the electric signal. Generally, such an image scanning device (or an image forming apparatus) obtains two-dimensional image information of a document as strips of images (hereafter called “line images”) with a small width. More specifically, an image scanning device uses an image sensor (hereafter called a line sensor) to convert each line (each line image) of a document into an electric signal, and obtains image information of the entire document by changing positions on the document to be illuminated (this is called “optical scanning”) and collecting electric signals from the line sensor.
Japanese Patent No. 3262609 discloses an image forming apparatus including an image scanning unit. The image scanning unit includes a charge coupled device (CCD) as a line sensor for converting a line image into an electric signal (analog image signal); a scanning optical system that optically scans a document line by line (line image by line image) and forms a reduced-size line image on the CCD; and an image signal processing circuit that amplifies the analog image signal from the CCD and converts the amplified analog image signal into digital image data. The CCD is a collection of small optical sensors (hereafter called “pixels”) that are arranged in a line. The image scanning unit also includes a shading correction circuit for compensating for the variation in the sensitivity of the pixels and the variation in the illumination caused by the scanning optical system.
Japanese Laid-Open Patent Publication No. 2000-122188 discloses a shading correction method. In the disclosed shading correction method, a white plate (hereafter called a reference white plate) provided near a document table is scanned with a line sensor to obtain digital image data of a line image of the reference white plate before scanning a document, and the digital image data are used as correction data. Here, the pixels constituting the line sensor output electric signals when the reference white plate is scanned. Since the reference white plate has a uniform white color, the levels of the electric signals from the pixels are ideally the same. In practice, however, the levels of the electric signals vary due to the variation in the sensitivity of the pixels and the variation in the illumination. For this reason, the electric signals are converted into digital values, and multiplier coefficients are obtained for the respective pixels such that the digital values are equalized. The obtained multiplier coefficients are used as correction values for the pixel outputs.
By the way, the theoretical maximum range (output dynamic range) of output data of an image signal processing circuit of an image scanning device is determined by the number of bits used for the output data. Using the entire output dynamic range for digital image data makes it possible to express gradations and colors of a document in detail.
Here, the white color of the reference white plate is determined to provide a highest digital value in a document image. Therefore, to obtain digital image data using the entire output dynamic range when scanning a document, it is preferable to set the amplifier gain of the image signal processing circuit such that a digital value obtained by scanning the reference white plate becomes close to the maximum value that can be expressed by the number of bits used for the digital image data.
JP2000-122188 also discloses a method for automatically setting the amplifier gain using a variable gain amplifier the gain of which can be electrically changed. In the disclosed method, a reference white plate is scanned once before scanning a document to obtain an analog image signal indicating a line image of the reference white plate, and the analog image signal is amplified by the variable gain amplifier and converted into digital image data. Then, a central processing unit (CPU) adjusts the gain of the variable gain amplifier such that the highest value in the digital image data falls within a predetermined range (target white level range). However, since the gain of a variable gain amplifier is normally changeable by a predetermined step, for example, by 3 dB steps (0 dB, +3 dB, +6 dB, . . . ) and there is a difference between a set gain value and the actual gain, it is difficult to accurately adjust the gain solely by a variable gain amplifier. To compensate for this problem, a digital amplifier that multiplies input digital data by a variable multiplier coefficient may be provided at the output side of an analog-to-digital converter.
However, since the image signal processing circuit of the related-art image scanning device adjusts the gain based only on a line image obtained by scanning the reference white plate once, the gain adjusting process is easily influenced by noise.
Here, since a reference white plate has a uniform white color and line image data of the reference white plate are averaged to some extent, the influence of noise can be normally ignored.
However, if there is dust or a flaw on the reference white plate, an extreme peak level caused, for example, by a reflection from the dust or flaw may be observed in line image data obtained by scanning the reference white plate. In such a case, it is difficult to properly average the line image data and to properly adjust the gain of the variable gain amplifier by removing the influence of noise. This may cause the image signal processing circuit to continuously output the maximum value determined by the number of bits used for output data and may also cause the image scanning device including the image signal processing circuit to fail.
Although the influence of noise may be reduced by scanning the reference white plate multiple times, this may increase the time for scanning, increase the time for adjusting the gain, and thereby increase the start-up time of an image forming apparatus. When both a variable gain amplifier and a digital amplifier are used to accurately adjust the gain, a peak level is detected to set the gain of the variable gain amplifier and then a peak level is detected again to obtain a multiplier coefficient for correcting an error in the gain of the variable gain amplifier. Therefore, in this case, the time necessary to adjust the gain becomes far longer.